package com.itheima.web;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySources;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by crowndint on 2018/10/1.
 */
@RestController
@ConfigurationProperties(prefix = "person")
public class DataController {


    private String name;
    private Integer age;

    @RequestMapping("show")
    public String show() {

        return " "+name+"  "+age;
    }

    public void setName(String name) {
        System.out.printf("setName--->"+name);
        this.name = name;
    }

    public void setAge(Integer age) {
        System.out.printf("setAge--->"+age);
        this.age = age;
    }
}
